// 样式导入
import '@/assets/css/main.css'
import '@/assets/css/animate.css'
// 引入字体图标
import '@/assets/font/iconfont/iconfont.css'
// 引入element-plus

import 'element-plus/dist/index.css'
import 'viewerjs/dist/viewer.css'

// Vue 核心
import { createApp } from 'vue'
import { createPinia } from 'pinia'


import App from './App.vue'
import router, { initRouter } from './router'

// UI 组件
import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import VueViewer from 'v-viewer'

const app = createApp(App)



// 注册插件
app.use(router)
app.use(ElementPlus, { locale: zhCn })
app.use(createPinia())
app.use(VueViewer)

// 注册 Element Plus 图标
Object.entries(ElementPlusIconsVue).forEach(([key, component]) => {
  app.component(key, component)
})

// 挂载应用
app.mount('#app')
